package init

import (
	"fmt"
	"github.com/spf13/viper"
	"video-service/basic/config"
)

func InitsConfig() {
	viper.SetConfigFile("../../dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
		return
	}
	fmt.Println("配置读取成功")
	err = viper.Unmarshal(&config.AppConf)
	if err != nil {
		panic(err)
		return
	}
	fmt.Println("配置解析成功")
}
